package com.aliyun.messagemgt.repository;

import com.aliyun.messagemgt.domain.repository.OperateLogRepository;
import com.aliyun.messagemgt.dto.OperateLog;
import com.aliyun.messagemgt.dto.OperateLogExportModel;
import com.aliyun.messagemgt.dto.query.OperateLogQuery;
import com.aliyun.messagemgt.repository.mappers.OperateLogMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author hzw
 * @Date 2020/12/17 11:25
 * @Version 1.0
 */
@Service
public class OperateLogMybatisRepository implements OperateLogRepository {
    @Autowired
    private OperateLogMapper operateLogMapper;

    @Override
    public int insertOperateLog(OperateLog operateLog) {
        return operateLogMapper.insertOperateLog(operateLog);
    }

    @Override
    public List<OperateLogExportModel> listOperateLog(OperateLogQuery operateLogQuery) {
        return operateLogMapper.listOperateLog(operateLogQuery);
    }

    @Override
    public int countOperateLog(OperateLogQuery operateLogQuery) {
        return operateLogMapper.countOperateLog(operateLogQuery);
    }
}
